package com.chb.test.useThread_04;

public class ThreadDemo {
    public static void main(String[] args) throws InterruptedException {
        /*
           String getName()     获取线程名称
           void setName(String name)  设置线程名称
           static Thread currentThread()  设置当前线程对象
           static void sleep(long time)  设置线程休眠时间
        */
        MyThread myThread = new MyThread("线程1");
        myThread.start();
        MyThread myThread1 = new MyThread("线程2");
        myThread1.start();
    }
}
